<template>
    <div>
      <table>
        <tr>
          <td>会员ID</td>
          <td>标题</td>
          <td>价格</td>
          <td>姓名</td>
          <td>手机号</td>
        </tr>
        <tr v-for="item in dinglist">

          <td>{{ item.uid.id }}</td>
          <td>{{ item.gid.name }}</td>
          <td>{{ item.gid.price }}</td>
          <td>{{ item.uid.name }}</td>
          <td>{{ item.uid.tel }}</td>
<!--          <td v-if="name==null">{{ item.price }}</td>-->
<!--          <td v-else>{{ item.vip_price }}</td>-->
<!--          <td><button @click="submit(item.id)">立即预定</button></td>-->
        </tr>
      </table>
    </div>
</template>

<script>
    import axios from "axios";

    export default {
        name: "show",
        data(){
          return{
            dinglist:[],

          }
        },
        mounted() {
          var uids = localStorage.getItem('uid');
          axios({
              method: 'post',
              url: 'http://127.0.0.1:8000/show/',
              data:{'uid_id':uids}

            }).then(res => {
              console.log(res);
              this.dinglist = res.data.dinglist;
            })


        },
    }
</script>

<style scoped>

</style>
